﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:core="clr-namespace:RadarControl.Core" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d">

	<Style TargetType="core:RadarControl">
		<Setter Property="Width"
			Value="300" />
		<Setter Property="Height"
			Value="300" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="core:RadarControl">
					<Viewbox>
						<Grid x:Name="RootContainer" Height="300" Width="300">
							<Grid.ColumnDefinitions>
								<ColumnDefinition Width="0.25*" />
								<ColumnDefinition Width="0.5*" />
								<ColumnDefinition Width="0.25*" />
							</Grid.ColumnDefinitions>
							<Grid.RowDefinitions>
								<RowDefinition Height="0.453*" />
								<RowDefinition Height="0.5*" />
							</Grid.RowDefinitions>
							<Path x:Name="PART_HeadingIndicator" Stretch="Fill"
								StrokeThickness="4"
								StrokeLineJoin="Round"
								Data="F1 M149.55586,154.64513 L228,22.999901 C201,12.1666 174,1.3332601 147.5,2.0832601 C121,2.8332601 95,15.1666 69,27.499901 L149.55586,154.64513 z"
								UseLayoutRounding="False"
								Grid.Column="1"
								Stroke="Black" Fill="#33FFFFFF" Canvas.ZIndex="1" Margin="0,-2,0,0" />
							<Canvas x:Name="PART_RadarIndicator" Grid.ColumnSpan="3" Grid.RowSpan="2" RenderTransformOrigin="0.5,0.5">
                                <Canvas.RenderTransform>
                                    <RotateTransform Angle="{Binding Rotation, RelativeSource={RelativeSource TemplatedParent}}" />
                                </Canvas.RenderTransform>
                                <Ellipse Stretch="Fill"
									StrokeThickness="4"
									StrokeLineJoin="Round"
                                         Stroke="{TemplateBinding BorderBrush}"
                                         Height="300"
                                         Width="300"
                                         Fill="{TemplateBinding Background}" />
								<TextBlock x:Name="Northindicator" HorizontalAlignment="Center" TextWrapping="Wrap" Text="N" VerticalAlignment="Top" Foreground="White" FontWeight="Bold" FontFamily="Segoe WP" FontSize="24" Margin="141,20,0,0"/>
							</Canvas>
						</Grid>
					</Viewbox>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
</ResourceDictionary>